﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TSBR.aspx.cs" Inherits="ConsolidationTool.WebParts.Layouts.CReport.Flash.TSBR" DynamicMasterPageFile="~masterurl/default.master" %>
<%@ Register TagName="EntitySelector" TagPrefix="RE" Src="~/_controltemplates/ConsolidationTool.WebParts/CommonEntitySelector.ascx" %>
<%@ Register TagName="ExportExcel" TagPrefix="RE" Src="~/_controltemplates/ConsolidationTool.WebParts/PublicExportExcel.ascx" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">
<style type="text/css">
    .fs-common-selector{border-collapse:collapse; font-size:12px;}
    .fs-common-selector td,.fs-common-selector th{text-align:left;text-indent:.5em;border:1px solid #ccc}
    .fs-common-selector th{background-color:#F7FBFF}
    
    td.gray,td.gray input{background-color:#E7E7E7; border:0;}
    td.blue,td.blue input{background-color:#E2F3FF; border:0;}
    td.green,td.green input{background-color:#DDF8E4; border:0;}
    td.green_loading,td.green_loading input{background-color:#DDF8E4; border:0;}
    
    .fs-control-done{ color:Green;}
    .fs-control-fail{ color:Blue; font-weight:bold;}
    
    .fs-webpart-container{min-width:850px}
    .fs-webpart-top{margin-bottom:1em}
    .commontable{width:98%;border-collapse:collapse; font-size:12px;}
    .commontable input[type=text],.fs-common-selector input[type=text]{width:95%; text-align:right;}
    .commontable td[identity]{text-align:right;}
    .commontable td{border:1px solid #ccc;min-height:20px;padding:.3em;}
    .grid{font-size:12px;}
    .fs-bottom-action{text-align:center;width:95%}
    .fs-display-title{min-width:160px;display:inline-block}
    .fs-control-field{ display:none;}
    .fs-control-display{  text-align:right;}
    .die{ display:none;}
</style>
</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
  <div class="fs-webpart-top">
        <RE:EntitySelector ID="commonEntitySelector" runat="server" />
    </div>
    
    <br />
    <asp:Button ID="GenerateReport" runat="server" Text="Generate Report" OnClick="GenerateReport_Click" />
    <%--<asp:Button ID="ExportReport" runat="server" Text="Export Report" />--%>
    <RE:ExportExcel ID="ExportExcel1" runat="server" />
    <br /><br />
    <table  id="fs_commontable" class="commontable">
    <thead>
        <tr>
            <td align="center"></td>
            <td align="center" style="width:50px;"></td>
            <td align="center" style="width:50px;"></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM1" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM2" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM3" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM4" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM5" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM6" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM7" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM8" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM9" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM10" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM11" runat="server" Text=""></asp:Label></td>
            <td align="center" colspan="2"><asp:Label ID="Title_HRM12" runat="server" Text=""></asp:Label></td>
        </tr>
        <tr>
            <td>Account Code</td>
            <td>RGC</td>
            <td>Description</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
            <td>QTY</td>
            <td>Turnover</td>
        </tr>
        <tr>
            <td></td>
            <td colspan="2"><span class="fs-display-title" style="font-weight: 700">Head product</span></td>
            <td colspan="24"></td>
        </tr>
        </thead>
<asp:Repeater ID="ReportRepeater" runat="server">
    <HeaderTemplate>
    </HeaderTemplate>
    <ItemTemplate>
        <tr class="grid">
            <td></td>
            <td><%# Eval("RGC") %></td>
            <td><%# Eval("Description")%></td>
            <td align="right"><%# Eval("QTY01") %></td>
            <td align="right"><%# Eval("QTY02") %></td>
            <td align="right"><%# Eval("QTY03") %></td>
            <td align="right"><%# Eval("QTY04") %></td>
            <td align="right"><%# Eval("QTY05") %></td>
            <td align="right"><%# Eval("QTY06") %></td>
            <td align="right"><%# Eval("QTY07") %></td>
            <td align="right"><%# Eval("QTY08") %></td>
            <td align="right"><%# Eval("QTY09") %></td>
            <td align="right"><%# Eval("QTY10") %></td>
            <td align="right"><%# Eval("QTY11") %></td>
            <td align="right"><%# Eval("QTY12") %></td>
            <td align="right"><%# Eval("QTY13") %></td>
            <td align="right"><%# Eval("QTY14") %></td>
            <td align="right"><%# Eval("QTY15") %></td>
            <td align="right"><%# Eval("QTY16") %></td>
            <td align="right"><%# Eval("QTY17") %></td>
            <td align="right"><%# Eval("QTY18") %></td>
            <td align="right"><%# Eval("QTY19") %></td>
            <td align="right"><%# Eval("QTY20") %></td>
            <td align="right"><%# Eval("QTY21") %></td>
            <td align="right"><%# Eval("QTY22") %></td>
            <td align="right"><%# Eval("QTY23") %></td>
            <td align="right"><%# Eval("QTY24") %></td>
        </tr>
    </ItemTemplate>
    <FooterTemplate>
    </FooterTemplate>
</asp:Repeater>
        
        <tr>
            <td>SV01020100</td>
            <td colspan="2">TOTAL Head Product</td>
            <td align="right"><asp:Label ID="Label_HRR01_C01" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C02" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C03" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C04" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C05" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C06" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C07" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C08" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C09" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C10" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C11" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C12" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C13" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C14" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C15" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C16" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C17" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C18" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C19" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C20" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C21" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C22" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C23" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR01_C24" runat="server" Text=""></asp:Label></td>
        </tr>
        <tr>
            <td></td>
            <td colspan="26"></td>
        </tr>
        <tr>
            <td></td>
            <td colspan="2"><span class="fs-display-title" style="font-weight: 700">1st Product</span></td>
            <td colspan="24"></td>
        </tr>
<asp:Repeater ID="TOReportRepeater" runat="server">
    <HeaderTemplate>
    </HeaderTemplate>
    <ItemTemplate>
        <tr class="grid">
            <td></td>
            <td><%# Eval("TORGC")%></td>
            <td><%# Eval("TODescription")%></td>
            <td align="right"><%# Eval("TOQTY01")%></td>
            <td align="right"><%# Eval("TOQTY02")%></td>
            <td align="right"><%# Eval("TOQTY03")%></td>
            <td align="right"><%# Eval("TOQTY04")%></td>
            <td align="right"><%# Eval("TOQTY05") %></td>
            <td align="right"><%# Eval("TOQTY06") %></td>
            <td align="right"><%# Eval("TOQTY07") %></td>
            <td align="right"><%# Eval("TOQTY08") %></td>
            <td align="right"><%# Eval("TOQTY09") %></td>
            <td align="right"><%# Eval("TOQTY10") %></td>
            <td align="right"><%# Eval("TOQTY11") %></td>
            <td align="right"><%# Eval("TOQTY12") %></td>
            <td align="right"><%# Eval("TOQTY13") %></td>
            <td align="right"><%# Eval("TOQTY14") %></td>
            <td align="right"><%# Eval("TOQTY15") %></td>
            <td align="right"><%# Eval("TOQTY16") %></td>
            <td align="right"><%# Eval("TOQTY17") %></td>
            <td align="right"><%# Eval("TOQTY18") %></td>
            <td align="right"><%# Eval("TOQTY19") %></td>
            <td align="right"><%# Eval("TOQTY20") %></td>
            <td align="right"><%# Eval("TOQTY21") %></td>
            <td align="right"><%# Eval("TOQTY22") %></td>
            <td align="right"><%# Eval("TOQTY23") %></td>
            <td align="right"><%# Eval("TOQTY24") %></td>
        </tr>
    </ItemTemplate>
    <FooterTemplate>
    </FooterTemplate>
</asp:Repeater>
        <tr>
            <td>SV01020200</td>
            <td colspan="2">Total 1st Product</td>
            <td align="right"><asp:Label ID="Label_HRR02_C01" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C02" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C03" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C04" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C05" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C06" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C07" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C08" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C09" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C10" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C11" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C12" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C13" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C14" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C15" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C16" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C17" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C18" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C19" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C20" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C21" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C22" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C23" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR02_C24" runat="server" Text=""></asp:Label></td>
        </tr>
        <tr>
            <td></td>
            <td colspan="26"></td>
        </tr>
        <tr>
            <td>SV01020300</td>
            <td colspan="2">Total Product</td>
            <td align="right"><asp:Label ID="Label_HRR03_C01" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C02" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C03" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C04" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C05" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C06" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C07" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C08" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C09" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C10" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C11" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C12" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C13" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C14" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C15" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C16" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C17" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C18" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C19" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C20" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C21" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C22" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C23" runat="server" Text=""></asp:Label></td>
            <td align="right"><asp:Label ID="Label_HRR03_C24" runat="server" Text=""></asp:Label></td>
        </tr>

    </table>
    <script type="text/javascript">
        $(function () {

            $("table.commontable tr td span[id*=Label_]").each(function () {
                var self = $(this); self.text(self.text().commafy());
            });

            $("table.commontable tr.grid td").each(function () {
                var self = $(this); self.text(self.text().commafy());
            });
        })
    </script>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
Flash Report - Trade Sales By RGC
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server" >
我的应用程序页
</asp:Content>
